package com.unhz.taigu.service;

import com.unhz.generator.pojo.ReceivingInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 魏运奇
 * @Description:
 * @Date: Created in 下午 6:40 2018/2/2 0002
 * @Modified By: V1.0.0
 */
public interface ReceivingInfoService {


    /**
     * 根据用户id查询收货信息
     * @param userId
     * @return
     */
    ReceivingInfo selectByUserId(Integer userId);

    /**
     * 添加收货信息
     * @param receivingInfo
     * @return
     */
    int insertAddress(ReceivingInfo receivingInfo);

    ReceivingInfo findByUserId(Integer userId);

    /**
     * 查询某个用户的默认收货信息
     * @param userId
     * @return
     */
    ReceivingInfo selectReceivingInfo(Integer userId);

    /**
     * 查询某个用户的所有收货信息
     * @param userId
     * @return
     */
    List<ReceivingInfo> selectAllReceivingInfo(Integer userId);

    int updateReceivingInfo(ReceivingInfo receivingInfo);
    //加的
    int updateReceivingInfoid(ReceivingInfo receivingInfo);
}
